Configuring your application

You can configure your Kanzi application:

While you can configure your Kanzi application in the onConfigure() function, in application.cfg you can configure some parameters without recompiling your application or even without a C++ application. The configuration you specify in application.cfg overrides the configuration you specify in onConfigure().

For example, in application.cfg you can tell your Kanzi application which kzb file to load, enable performance information in your application, and set how many threads you want to use for loading the application resources.

For a list of all the configuration settings you can use for your Kanzi application, see Application configuration reference.

Setting which application.cfg to use

When you have more than one Kanzi application executable file in a directory you can specify a separate configuration file for each executable.

To set which application.cfg to use when running your Kanzi application from the command line enter the name of the application executable file followed by the -config option, and the name of the configuration file.

For example, to run a Kanzi application named MyApplication with the myConfiguration.cfg file use

MyApplication.exe -config=myConfiguration.cfg

Using the application.cfg

To configure your Kanzi application using application.cfg, create an application.cfg file that contains the parameter names and their values in:

When you launch your Kanzi application, the application uses the parameters in the application.cfg to configure your application.

Running an application without reading the application.cfg

On some embedded platforms reading the application.cfg file can have a performance impact.

To run an application without reading the application.cfg file, on the command line launch your Kanzi application with the -config="" option.

For example, to run a Kanzi application named MyApplication without reading the application.cfg file use

MyApplication.exe -config=""

See also

Application configuration reference

Best practices

Loading resources in parallel

Using kzb files